﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using TPCN.DAL;

namespace TPCN.Admincp
{
    public partial class Loinhuan : System.Web.UI.Page
    {
        DateTime startDate, endDate;

        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            startDate = dateStart.SelectedDate.Value;
            endDate = dateEnd.SelectedDate.Value;
            DataTable tb = new DataTable();
            tb = HoaDonBanDAL.Loinhuan(startDate, endDate);
            lblMoney.Text = tb.Rows[0][2].ToString() == "" ? "0" : tb.Rows[0][2].ToString();
            lblDoanhthu.Text = tb.Rows[0][0].ToString() == "" ? "0" : tb.Rows[0][0].ToString();
            lblVon.Text = tb.Rows[0][1].ToString() == "" ? "0" : tb.Rows[0][1].ToString();
        }
    }
}